package homework1;

import java.util.Scanner;

import org.junit.Test;

public class VehicleTest {
	public static void main(String[] args) {
		
		@SuppressWarnings("resource")
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入车的速度：");
		@SuppressWarnings("unused")
		int speed = scanner.nextInt();
		System.out.println("请输入车的体积大小：");
		@SuppressWarnings("unused")
		int size = scanner.nextInt();
		Vehicle vehicle = new Vehicle();
		System.out.println(vehicle);//初始化
		System.out.println(vehicle.getSpeed());//get方法打印speed
		System.out.println(vehicle.getSize());//get方法打印size
		System.out.println("-----------");
		System.out.println("-----------");
		
		vehicle.speedUp();
		System.out.println("更新后车的速度为：" + vehicle.getSpeed());
		vehicle.speedDown();
		System.out.println("更新后车的速度为：" + vehicle.getSpeed());
	}
	
	@Test
	public void test01() {
		Vehicle vehicle = new Vehicle(10, 2);
		vehicle.move();
		//vehicle.speedUp();
		//System.out.println("更新后车的速度为：" + vehicle.getSpeed());
		//vehicle.speedDown();
		//System.out.println("更新后车的速度为：" + vehicle.getSpeed());
	}

}
